package com.weixing.mall.provider.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weixing.mall.core.support.auth.SysAuth;
import com.weixing.mall.provider.model.domain.AgentRenew;
import com.weixing.mall.provider.model.dto.renew.AgentRenewDto;
import com.weixing.mall.provider.model.dto.renew.AgentRenewEditDto;
import com.weixing.mall.provider.model.query.AgencyFeeQuery;
import com.weixing.mall.provider.model.query.AgencyRecordQuery;
import com.weixing.mall.provider.model.vo.AgencyFeeVo;
import com.weixing.mall.provider.model.vo.AgentRenewVo;
import com.weixing.mall.provider.model.vo.renew.RenewStats;

import java.util.List;

/**
 * <p>
 * 代理商模块-代理商续费表 服务类
 * </p>
 *
 * @author Small
 * @since 2019-11-18
 */
public interface IAgentRenewService extends IService<AgentRenew> {


    IPage<AgencyFeeVo> selectAgencyFeeListOfPage(Page page, AgencyFeeQuery AgentRenewQuery, SysAuth auth);

    Long save(AgentRenewDto agentRenewDto, SysAuth auth);

    IPage<AgentRenewVo> agentRenewList(Page page, Long agentId);

    List<AgencyFeeVo> selectAgencyFeeList(AgencyFeeQuery agentRenewQuery);

    /**
     * 查询代理缴费列表
     *
     * @param initMpPage    分页
     * @param agentRenewQuery   查询条件
     * @return  缴费记录
     */
    IPage<AgencyFeeVo> selectRenewList(Page initMpPage, AgencyFeeQuery agentRenewQuery);

    /**
     * 查询代理缴费记录
     *
     * @param initMpPage    分页
     * @param query 查询条件
     * @return 缴费记录
     */
    IPage<AgentRenewVo> selectRenewRecordList(Page initMpPage, AgencyRecordQuery query);
    /**
     * 统计代理缴费记录
     *
     * @param query 查询条件
     * @return 统计详情
     */
    RenewStats renewStats(AgencyRecordQuery query);

    void editRecord(AgentRenewEditDto dto);
}
